import sys
import copy
import functools
import datetime
import decimal
from functools import update_wrapper
# Python 3兼容性修复：getargspec在Python 3.11+中被移除
try:
    from inspect import getargspec
except ImportError:
    from inspect import getfullargspec as getargspec

from django import forms
from django.utils.encoding import force_str as force_unicode
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import ValidationError
from django.core.serializers.json import DjangoJSONEncoder
from django.urls import reverse
from django.http import HttpResponse
from django.template import Context, Template
from django.template.response import TemplateResponse
try:
    from collections import OrderedDict as SortedDict
except ImportError:
    from django.utils.datastructures import SortedDict
from django.utils.decorators import method_decorator, classonlymethod
from django.utils.encoding import smart_str as smart_unicode
from django.utils.http import urlencode
# Django 5.1兼容性修复：使用collections.abc.Iterable替代已弃用的is_iterable
try:
    from django.utils.itercompat import is_iterable
except ImportError:
    import collections.abc
    def is_iterable(obj):
        return isinstance(obj, collections.abc.Iterable) and not isinstance(obj, (str, bytes))
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
from django.utils.translation import gettext as _
from django.views.decorators.csrf import csrf_protect
from django.views.generic import View
from xadmin.util import static, json, vendor, sortkeypicker 